One key component of any computer system is a device to store data. Computer systems have many different devices where data can be stored. One common place for storing massive amounts of data in a computer system is on a disc drive. The most basic parts of a disc drive are a disc that is rotated, an actuator that moves a transducer to various locations over the disc, and circuitry that is used to write and read data to and from the disc. The disc drive also includes circuitry for encoding data so that it can be successfully retrieved from and written to the disc surface. A microprocessor controls most of the operations of the disc drive, in addition to passing the data back to the requesting computer and taking data from a requesting computer for storing to the disc.
The interface for transferring data between the disc drive and the rest of the computer system is typically a bus or channel, such as the Small Computer Systems Interface ("SCSI"), or the Fibre Channel. Certain aspects of such interfaces are often standardized in order that various devices from different manufacturers can be interchanged and all can be connected to a common interface. Such standards are typically specified by some standards committee of an organization such as the American National Standards Institute ("ANSI").
One standardized interface for exchanging data between various storage devices and various computers is the fibre channel. In some embodiments, the fibre-channel standard includes arbitrated loops (described further below). In some embodiments, the fibre-channel standard supports a SCSI-like protocol for controlling data transfers.
Fibre channels represent significant advantages over Small Computer Standard Interface ("SCSI") designs. Fibre channels provide significantly higher bandwidths, currently up to about 106 megabytes per second, compared to between two and twenty megabytes per second for traditional SCSI designs. Fibre channels provide greater connectivity in that up to one-hundred twenty-six devices (including the host) may be connected, as compared to a maximum of seven or fifteen devices in typical SCSI environments. The fibre channel can be attached with a single connector and does not require a switch. A fibre channel using coaxial electrical conductors operates at distances of up to thirty meters between devices, and up to ten kilometers using fibre optics for an entire channel, as compared to a maximum total length of up to twenty-five meters for SCSI environments.
In SCSI environments, errors in data transmission are detected through use of parity, whereas in fibre channels, errors are identified by a running disparity and cyclic-redundancy-code check ("CRC check") information. More information can be found in U.S. Pat. No. 5,802,080 entitled "CRC Checking Using a CRC Generator in a Multi-port Design," and U.S. Pat. No. 5,663,724 entitled "16B/20B Encoder," both by the present inventor, Westby, and commonly assigned to the present assignee Seagate Technology, Inc.
The fibre-channel arbitrated loop ("FC-AL") is an industry-standard system employing a byte-oriented DC-balanced (0,4) run-length-limited 8B/10B-partitioned block-transmission code scheme. The FC-AL operates at a clock frequency of 106.25 MHZ. One form of an 8B/10B encoder/decoder is described in U.S. Pat. No. 4,486,739 granted Dec. 4, 1984 for "Byte Oriented DC Balanced (0,4) 8B/10B Partitioned Block Transmission Code" by Franaszek et al.
A fibre-channel arbitrated loop ("FC-AL") allows for multiple devices, each called "a node," to be connected together. A node may be any device (a computer, workstation, printer, disc drive, scanner, etc.) of the computer system having an interface allowing it to be connected to a fibre-channel "topology" (defined just below). Each node has at least one port, called an NL port ("node-loop port") to provide access to other nodes. The components that connect two or more ports together are collectively called a "topology" or a "loop." Each node communicates with all other nodes within the provided topology or loop.
Ports are the connections in a fibre-channel node, though which data may pass over the fibre channel to ports of other nodes (the outside world). A typical fibre-channel drive has two ports packaged within the drive's node. Each port includes a pair of "fibers"--one to carry information into the port and one to carry information out of the port. Each "fiber" is a serial data connection, and, in one embodiment, each fiber is actually a coaxial wire (e.g., coaxial copper conductors, used when the nodes are in close proximity to one another); in other embodiments, a fiber is implemented as an optical fiber for at least some of its path (e.g., when nodes are separated by an appreciable distance, such as nodes in different cabinets or, especially, different buildings). The pair of fibers connected to each port (one carrying data into the port, the other carrying data out from the port) is called a "link" and is part of each topology. Links carry information or signals packaged in "frames" between nodes. Each link can handle multiple types of frames (e.g., initialization, data, and control frames).
Since each fiber carries data in one direction only, nodes are connected to one another along a loop, wherein the nodes must arbitrate for control of the loop when they have data to transfer. "Arbitration" is the process of coordinating the nodes to determine which one has control of the loop. Fibre-channel arbitrated loops attach multiple nodes in the loop without hubs or switches. The node ports use arbitration operations to establish a point-to-point data-transfer circuit. FC-AL is a distributed topology where each port includes at least the minimum necessary function to establish the circuit. The arbitrated-loop topology is used to connect any number of nodes between two and one-hundred twenty-six (126) node ports.
In some embodiments, each node includes dual ports (each connected to a separate loop) which provide redundancy, so that if one loop fails, the other one can fulfill the loop duties. Dual ports also allow two hosts (e.g., two host computers) to share a single drive.
Fairness Background
"Fairness" in the context of the present invention is a mode of operation wherein a shared resource, such as a Fibre Channel loop, is made available on a timely basis to each of a plurality of users, such as to each of a plurality of disc drives 100; i.e., without undue delay, and for an amount of time proportional to the amount of data each disc drive 100 needs to transfer. "Playing unfair" is a mode of operation wherein one user, for example one disc drive, will take control of the shared resource, for example the Fibre Channel loop, either too often or for too long a period of time, thus depriving other disc drives that need to use the loop of its use.
"Fairness" allows each port to gain access to the loop (based on priority) and transmit as much information as it wants (no time limit). It must then wait to arbitrate gain until all other ports have used their access.
The protocol for the Loop permits each L.sub.-- Port (also called a loop port; an L.sub.-- Port can be either a normal loop port "NL.sub.-- Port" or a fabric-loop port "FL.sub.-- Port" that is used generally to interconnect two loops to one another) to continuously arbitrate to access the Loop. A priority is assigned to each participating L-port based on the Arbitrated Loop Physical Address (AL.sub.-- PA). As with other prioritized protocols, this could lead to situations where the lower priority L.sub.-- Ports cannot gain access to the Loop. The access fairness algorithm sets up an access window in which all L.sub.-- Ports are given an opportunity to arbitrate and win access to the Loop. When all L.sub.-- Ports have had an opportunity to access the Loop once, a new access window is started. An L.sub.-- Port may arbitrate again and eventually win access to the Loop in the new access window. Not every L.sub.-- Port is required to access the Loop in any one access window.
When an L.sub.-- Port which uses the access fairness algorithm has arbitrated for and won access to the Loop, the L.sub.-- Port shall not arbitrate again until at least one Idle has been transmitted by the L.sub.-- Port. The time between the first L.sub.-- Port to win arbitration and transmitting an Idle is an access window. A special arbitration Primitive Signal (i.e., ARB(F0)) is used to prevent an early reset of the access window. The details of the access fairness algorithm are contained in the Fibre-Channel FC-AL Specification (ANSI Standards: Fibre Channel FC-AL X3T11/Project 960D/Rev. 4.5 and Fibre Channel FC-AL2 X3T11/Project 1133D/Rev. 6.3).
The access fairness algorithm does not limit the time that an L.sub.-- Port controls the Loop once it wins arbitration, just as ANSI X3.230, FC-PH does not limit the time for a Class 1 connection. However, if access is denied longer than E.sub.-- D.sub.-- TOV, the access window is reset and an L.sub.-- Port may begin arbitrating.
Although all L.sub.-- Ports shall implement the fairness algorithm, neither FL.sub.-- Ports nor NL.sub.-- Ports are required to use the fairness algorithm at all times. For example, if one L.sub.-- Port requires more Loop accesses than the other L.sub.-- Ports, that L.sub.-- Port may choose to be unfair.
To provide equal access to the Loop for all L.sub.-- Ports, it is recommended that each L.sub.-- Port use the access fairness algorithm. When an L.sub.-- Port is using the access fairness algorithm, it is called a "fair" L.sub.-- Port.
When a fair L.sub.-- Port has arbitrated for and won access to the Loop and does not detect that another L.sub.-- Port is arbitrating, that L.sub.-- Port may keep the existing circuit open indefinitely or close that circuit and retain ownership of the Loop (i.e., without re-arbitrating) to open another L.sub.-- Port on the Loop.
When a fair L.sub.-- Port has access to the Loop and detects that another L.sub.-- Port is arbitrating, the L.sub.-- Port may close the Loop at the earliest possible time. The L.sub.-- Port shall close the Loop and arbitrate again in the next access window before opening a different L.sub.-- Port.
The configuration of some Loops may require that certain L.sub.-- Ports have more access to the Loop than just once per access window. Examples of these L.sub.-- Ports include, but are not limited to, a subsystem controller or a file server.
An L.sub.-- Port may be initialized (or may temporarily choose) not to use the access fairness algorithm. When an L.sub.-- Port is not using the fairness algorithm, it is called an "unfair" L.sub.-- Port. The decision whether to participate in access fairness is left to the needs of the implementation.
When an unfair L.sub.-- Port has arbitrated for and won access to the Loop and does not detect that another L.sub.-- Port is arbitrating, that L.sub.-- Port may keep the existing circuit open indefinitely or close that circuit and retain ownership of the Loop (i.e., without re-arbitrating) to open another L.sub.-- Port on the Loop.
When an unfair L.sub.-- Port controls the Loop and detects that another L.sub.-- Port is arbitrating, the unfair L.sub.-- Port may close the Loop at the earliest possible time. The unfair L.sub.-- Port may retain ownership of the Loop (i.e., without re-arbitrating) and open another L.sub.-- Port on the Loop.
A participating FL.sub.-- Port is always the highest priority L.sub.-- Port on the Loop based on its AL.sub.-- PA. An FL.sub.-- Port is exempted from using access fairness algorithm because the majority of its traffic is with the rest of the Fabric.
When an FL.sub.-- Port controls the Loop and detects that another NL.sub.-- Port is arbitrating, the FL.sub.-- Port may close the Loop at the earliest possible time. Because the FL.sub.-- Port has the highest priority and is exempted from fairness, it will always win arbitration. Therefore, if communication is required with another NL.sub.-- Port, the FL.sub.-- Port may retain its access to the Loop (i.e., without re-arbitrating) and open another NL.sub.-- Port on the Loop.
There is, therefore, a need for an arrangement to preserve loop fairness, particularly in fibre-channel embodiments that include a dynamic half-duplex feature.